package com.whynot.frame.transaction.controller;

import com.whynot.frame.transaction.aspect.UserAccess;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述: 测试的rest接口
 * 作者: chenyao
 * 日期: 2018-05-11
 * 项目名称: hollybeaconjdemo
 * 版本: 1.0.0
 * JDK: since 1.8
 */
@RestController
public class UserController {
    @RequestMapping("/first")
    public Object first() {
        return "first controller";
    }

    @RequestMapping("/doError")
    public Object error() {
        return 1 / 0;
    }

	@RequestMapping("/second")
    @UserAccess(desc = "second")
    public Object second() {
        return "second controller";
    }

}
